# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-litecli
_pkgname=litecli
pkgver=1.15.0
pkgrel=1
pkgdesc='CLI for SQLite Databases with auto-completion and syntax highlighting.'
arch=('any')
url='https://pypi.org/project/litecli/#files'
license=('BSD')
depends=('python' 'python-click' 'python-pygments' 'python-prompt_toolkit'
         'python-sqlparse' 'python-configobj' 'python-cli-helpers')
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('e11249440eb100a7d2d4658afdac0a4518bc77edb457e8bc028c2f7344f8f46a7fc91980c686d268346ec30f2a1f16a122347a6f3e2183f76e7379a5f474d5fc')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

